<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
    <head>
        <title>TODO supply a title</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
    </head>
    <body>
        <div>
            <h2>兼职外包列表</h2>
            <h3><a href="<?php print U('Admin/partTime/add');?>">添加</a>
                <a href="<?php print U('Admin/User/index');?>">退出</a>
            </h3>                       
            <table border='1' cellspacing='0'>
                <tr>
                    <th>用户名</th>
                    <th>title</th>
                    <th>Drupal 版本</th>
                    <th>项目周期</th>
                    <th>状态</th>
                    <th>body</th>
                    <th>创建时间</th>
                    <th>更新时间</th>
                    <th>操作</th>
                </tr>
              
                <?php foreach($data as $key=>$value){?>
                    <tr>  
                        <th><?php print $value['name']?></th>
                        <th><?php print $value['title']?></th>
                        <th><?php print $value['drupal_version']?></th>
                        <th><?php print $value['project_cycle']?></th>
                        <th><?php  if($value['project_status']==1){ echo "未接单";}elseif($value['project_status']==2){ echo "已接单";}else{ echo "已完成";}; ?>
                        </th>
                        <th><?php print html_entity_decode($value['body']);?></th>
                        <th><?php print date('Y-m-d',$value['create_time']);?></th>
                        <th><?php if($value['update_time']==0){ echo "NULL";}else{ print date('Y-m-d',$value['update_time']);} ?>
                        </th>
                        <th>
                            <a href="<?php print U('Admin/partTime/update?id='.$value['id']);?>">更新</a>
                            <a href="<?php print U('Admin/partTime/delete?id='.$value['id']);?>">删除</a>
                        </th>
                    </tr>  
                <?php }?>
            </table>            
        </div>
    </body>
</html>